import { INestApplication } from '@nestjs/common'
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'
export function setupSwagger(app: INestApplication): void {
  const options = new DocumentBuilder()
    .setTitle('nestjs-backend')
    .setDescription('The nest RestAPI description')
    .setVersion('1.0')
    .addBearerAuth()
    .build()
  const document = SwaggerModule.createDocument(app, options)
  SwaggerModule.setup('api-docs', app, document)
}
